﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Shared.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <DataTemplate x:Name="NewsTemplateNormal">
        <Grid Width="250"
              Height="250"
              Background="{StaticResource SecondaryBrush}">
            <TextBlock Margin="15"
                       FontSize="20"
                       FontWeight="Light"
                       Foreground="{StaticResource SecondaryContrastBrush}"
                       TextWrapping="Wrap">
                <Run Text="{Binding Body}" />
            </TextBlock>
            <StackPanel VerticalAlignment="Bottom">
                <Polygon Fill="{StaticResource PrimaryBrush}"
                         Points="0,30 250,30 250,0"
                         RenderTransformOrigin="0.5,0.5">
                    <Polygon.RenderTransform>
                        <CompositeTransform ScaleX="-1" />
                    </Polygon.RenderTransform>
                </Polygon>
                <Grid Background="{StaticResource PrimaryBrush}">
                    <StackPanel MaxHeight="85" Margin="10,5,20,20">
                        <TextBlock HorizontalAlignment="Left"
                                   FontSize="15"
                                   Foreground="{StaticResource PrimaryContrastBrush}"
                                   Text="{Binding Date, Converter={StaticResource DateStringConverter}, ConverterParameter='ddd. MMM d'}"
                                   TextWrapping="NoWrap" />
                        <TextBlock FontSize="20" MaxHeight="75"
                                   Foreground="{StaticResource PrimaryContrastBrush}"
                                   Text="{Binding Title}"
                                   TextTrimming="WordEllipsis"
                                   TextWrapping="Wrap" />
                    </StackPanel>
                </Grid>
            </StackPanel>
        </Grid>
    </DataTemplate>

    <DataTemplate x:Name="NewsTemplateHero">
        <Grid Width="500" Height="250">
            <Grid.Background>
                <SolidColorBrush Opacity=".9" Color="{StaticResource SecondaryColor}" />
            </Grid.Background>
            <TextBlock FontSize="35" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="20" FontFamily="Segoe UI Symbol"></TextBlock>
            <StackPanel Margin="15,15,30,15">
                <TextBlock MaxHeight="225"
                           Foreground="{StaticResource SecondaryContrastBrush}"
                           FontWeight="Light"
                           TextTrimming="WordEllipsis"
                           TextWrapping="Wrap">
                    <Run FontSize="20" Text="{Binding Date, Converter={StaticResource DateStringConverter}, ConverterParameter='ddd. MMM d'}" />
                    <LineBreak />
                    <Run FontSize="35" Text="{Binding Title}" />
                    <LineBreak />
                    <LineBreak />
                    <Run FontSize="25" Text="{Binding Body}" />
                </TextBlock>
            </StackPanel>
        </Grid>
    </DataTemplate>


</ResourceDictionary>
